<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            width:400px;
            height: 400px;
            background:red;

            /*将块级元素横向居中*/
            margin:10px auto;
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>